package skean.yzsm.com.androidvideocache;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.Window;
import android.widget.FrameLayout;
import android.widget.MediaController;
import android.widget.VideoView;

import com.danikula.videocache.CacheListener;

import java.io.File;

/**
 *
 */

public class ViewActivity extends AppCompatActivity implements CacheListener{

    public static final String EXTRA_PATH = "path";

    private VideoView vvPreview;
    private String path;
    private FrameLayout videoLayout;
    private MediaController umcController;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_view);
        initView();
        path = getIntent().getStringExtra(EXTRA_PATH);

    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
    }

    private void initView() {
        vvPreview = (VideoView) findViewById(R.id.vvPreview);
        videoLayout = (FrameLayout) findViewById(R.id.video_layout);
        umcController = (MediaController) findViewById(R.id.umcController);
    }

    @Override
    public void onCacheAvailable(File cacheFile, String url, int percentsAvailable) {

    }
}
